<?php

namespace App\Admin\Controllers;

use App\Admin\Metrics\BannerMaintenanceRecordCounts;
use App\Admin\Metrics\BannerMyAssetsWorth;
use App\Admin\Metrics\BannerMyTodoCounts;
use App\Admin\Metrics\BannerMyYesTerDayCounts;
use App\Admin\Metrics\Examples;
use App\Admin\Metrics\TodayOrders;
use App\Admin\Metrics\UserAdd;
use App\Admin\Metrics\UserBar;
use App\Http\Controllers\Controller;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;

class HomeController extends Controller
{
    public function index(Content $content)
    { return $content
        ->title('控制台')
        ->header('控制台')
        ->description('掌握你的一切资源...')
        ->body(function (Row $row) {
            //今日成交额
            $row->column(4, new BannerMyAssetsWorth());
            //今日订单数
            $row->column(4, new TodayOrders());
            //今日新增用户数
            $row->column(4, new BannerMyTodoCounts());


            //昨日新增用户数
            $row->column(4, new BannerMyYesTerDayCounts());
            //昨日成交额改为总计2021-12-26开始
//                $row->column(4, new YesterdayCounts());
            //用户总数
            $row->column(4, new BannerMaintenanceRecordCounts());



//            $row->column(6, function (Column $column) {
//
//                $column->row(new UserBar());
//            });
            $row->column(6, function (Column $column) {

                $column->row(new UserAdd());
            });
        });
    }
}
